<#assign basePath=request.contextPath>
<#include "${basePath}/include.ftl" >
<body>
    <div class="layui-container" style="padding: 15px 20px 20px 20px;">
        <form class="layui-form layui-form-pane" action="" id="form">

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">上级目录:</label>
                <div class="layui-input-block">
                    <input type="text" autocomplete="off" placeholder="请选择上级目录" class="layui-input" readonly="true"
                           style="background-color: #eee;" onclick="setParentId()" id="parentName" validate="required" value="主目录">
                    <!-- 部门id  -->
                    <input type="hidden" name="parentId" autocomplete="off" class="layui-input" readonly="true"
                           style="background-color: #eee;"  id="parentId" value="0">
                </div>
            </div>

            <div class="layui-form-item" pane="">
                <label class="layui-form-label layui-input-required">菜单类型:</label>
                <div class="layui-input-block">
                    <input type="radio" name="menuType" value="M" title="目录" lay-filter="menuType" checked="">
                    <input type="radio" name="menuType" value="C" title="菜单" lay-filter="menuType">
                    <input type="radio" name="menuType" value="F" title="按钮" lay-filter="menuType" >
                </div>
            </div>

            <div class="layui-form-item" pane="">
                <label class="layui-form-label layui-input-required">菜单状态:</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="0" title="正常" checked="">
                    <input type="radio" name="status" value="1" title="停用">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">菜单名称:</label>
                <div class="layui-input-block">
                    <input type="text" name="menuName" autocomplete="off" placeholder="请输入菜单名称" class="layui-input" validate="required">
                </div>
            </div>

            <!-- 只有菜单显示 -->
            <div class="layui-form-item url" pane=""  style="display: none">
                <label class="layui-form-label layui-input-required">请求地址:</label>
                <div class="layui-input-block">
                    <input type="text" name="url" autocomplete="off" id="url" placeholder="请输入请求地址" class="layui-input" value="#">
                </div>
            </div>

            <!-- 目录不显示 -->
            <div class="layui-form-item perms" style="display: none">
                <label class="layui-form-label layui-input-required">权限标识:</label>
                <div class="layui-input-block">
                    <input type="text" name="perms" autocomplete="off" id="perms" placeholder="请输入权限标识" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">显示排序:</label>
                <div class="layui-input-block">
                    <input type="number" name="orderNum" autocomplete="off" placeholder="请输入显示排序" class="layui-input" validate="required">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">备注:</label>
                <div class="layui-input-block">
                    <input type="text" name="remark" autocomplete="off" placeholder="请输入备注" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item icon">
                <label class="layui-form-label layui-input-required">图标:</label>
                <div class="layui-input-block">
                    <input type="text" name="icon" autocomplete="off" placeholder="请选择图标" class="layui-input" validate="required" style="background-color: #eee;" readonly="true" id="icon"  onclick="setIcon()">
                </div>
            </div>
        </form>
    </div>
</body>
<script type="text/javascript" src="${baseApp}/system/menu/menu_insert.js"></script>
